<?php
    require_once "config.php";
    if($_SERVER['REQUEST_METHOD'] == 'POST'){
        $id = $_POST['id'];
        if(empty($id)){
            $result['status'] = 'n';
    		$result['info'] = '数据为空，请重新提交';
            exit(json_encode($result));
        }
        $sql="select * from dyspw_goods where u_id = ".$id;
        $goodslist = mysqli_query($mysql, $sql);
        $goodslist = $goodslist->fetch_all(MYSQLI_ASSOC);
        if(!empty($goodslist)){
            $result['status'] = 'y';
    		$result['data'] = $goodslist;
            exit(json_encode($result));
        }else{
            $result['status'] = 'n';
    		$result['info'] = '未查询到信息';
            exit(json_encode($result));
        }
    }
 ?>
